<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 400px;
        }
        /* rotateX案例 */
        .rx {
            width: 200px;
            height: 200px;
            margin: 100px auto;
            background: url(../img/img.png) no-repeat;
            transition: all 1.5s;
        }
        .rx:hover {
            transform: rotateX(90deg);
        }

        /* rotateY案例 */
        .ry {
            width: 200px;
            height: 200px;
            margin: 100px auto;
            background: url(../img/img.png) no-repeat;
            transition: all 1.5s;
        }
        .ry:hover {
            transform: rotateY(90deg);
        }

        /* rotateZ */
        .rz {
            width: 200px;
            height: 200px;
            margin: 100px auto;
            background: url(../img/img.png) no-repeat;
            transition: all 1.5s;
        }
        .rz:hover {
            transform: rotateZ(90deg);
        }
    </style>
</head>
<body>
    <div class="rx"></div>

    <div class="ry"></div>

    <div class="rz"></div>

    <!-- 

    6.53D旋转rotate3d

    3D旋转指可以让元素在三维平面内沿着x轴， y轴，z轴或者自定义轴进行旋转。
    
    语法:

    transform:rotateX(45deg):沿着x轴正方向旋转45度
    transforia:rotateY(45deg) :沿着y轴正方向旋转45deg
    transform:rotateZ(45deg) :沿着Z轴正方向旋转45deg
    transform:rotate3d(x,y,z,deg):沿着自定义轴旋转deg为角度（了解即可)


    6.5 3D旋转rotate3d

    transform:rotate3d(x,y,z,deg):沿着自定义轴旋转deg为角度（了解即可)
    xyz是表示旋转轴的矢量，是标示你是否希望沿着该轴旋转，最后一个标示旋转的角度。
    transform:rotate3d(1,0,0,45deg)就是沿着x轴旋转45deg
    transform:rotate3d(1,1,0,45deg)就是沿着对角线旋转45deg


    -->
</body>
</html>